package Expe9;

/**
 * @Author 28021
 * @Date 2022/10/25
 */
public class T5 {
    public static void main(String[] args) {
        C q = new C();
        System.out.println(q.computer(4,2));
        System.out.println(q.g(4,2));
        D w = new D();
        System.out.println(w.computer(4f,2f));
        System.out.println(w.g(4,2));
    }
}
class C{
    float computer(float x,float y){
        return x+y;
    }
    int g(int x,int y){
        return x+y;
    }
}
class D extends C{
    @Override
    float computer(float x,float y){
        return  x*y;
    }
    @Override
    public int g(int x,int y){
        return  x-y;
    }
}
